﻿<?php
	session_start();
	require_once('../../lib/'.'BaseDir.inc.htm');	
	require_once('../../lib/'.'DBCommon.class.htm');
	
	
	$ModifiedBy = $_SESSION['userName'];	
	$oDB = new DBCommon();
	$conn =  $oDB->stl_openConn();	
	
	$Value = $_POST["Value"];
	
	$q = "
		INSERT INTO `qltbv2`.`commission_tbl` (`ID`, `Value`, `Note`, `CreateDate`, `LastUpdate`, `ModifiedBy`, `isDeleted`) 
		VALUES (NULL, '".$Value."', '', '".date("Y-m-d H-i-s")."', CURRENT_TIMESTAMP, '".$ModifiedBy."', '0');
	";	
	
	//echo $q;
	
	$rs_insert = $oDB->stl_db_change($q, $conn);
	
	if($rs_insert)
	{
		echo "OK";
	}
	else
	{
		echo "NG";
	}
	
	$oDB->stl_closeConn($conn);
	
?>
